package com.allenlee.mvphelper.base;

/**
 * @author : lifei
 * 创建时间： 19-11-27
 * 更改时间： 19-11-27
 * Email : allen.lee723@qq.com
 * @version :
 * Description：
 */
public abstract class BasePresenter<V extends IBaseView> implements IBasePresenter {

    protected V mView;

    @SuppressWarnings("unchecked")
    @Override
    public void attach(IBaseView view) {
        mView = (V) view;
    }

    @Override
    public void detach() {
        mView = null;
    }

    @Override
    public boolean isAttached() {
        return mView != null;
    }
}